package com.by.bean;

import com.by.common.group.ISave;
import com.by.common.group.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author wang
 * @version 版本号 ${}
 * @className Dept
 * @日期 2024/9/9 9:22
 * @since jdk1.8
 */
@ApiModel ("部门")
@Data
public class Dept {
    @NotNull (message = "修改时id不能为空", groups = {IUpdate.class})
    Integer id;
    
    
    @ApiModelProperty (value = "部门名称")
    @NotBlank (message = "部门名称不能为空", groups = {ISave.class, IUpdate.class})
    String name;
    
    @ApiModelProperty (value = "上级部门id，顶级部门为0", required = true)
    int parentId;
    
    @ApiModelProperty (hidden = true, value = "部门编码")
    String deptCode;
    
}
